<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 好友表
 * Class ChatFriend
 *
 * @since 2.0
 *
 * @Entity(table="chat_friend")
 */
class ChatFriend extends Model
{
    /**
     * 好友编号
     *
     * @Column(name="friend_id", prop="friendId")
     *
     * @var int
     */
    private $friendId;

    /**
     * 编号
     * @Id()
     * @Column()
     *
     * @var int
     */
    private $id;

    /**
     * 用户编号
     *
     * @Column(name="user_id", prop="userId")
     *
     * @var int
     */
    private $userId;


    /**
     * @param int $friendId
     *
     * @return self
     */
    public function setFriendId(int $friendId): self
    {
        $this->friendId = $friendId;

        return $this;
    }

    /**
     * @param int $id
     *
     * @return self
     */
    public function setId(int $id): self
    {
        $this->id = $id;

        return $this;
    }

    /**
     * @param int $userId
     *
     * @return self
     */
    public function setUserId(int $userId): self
    {
        $this->userId = $userId;

        return $this;
    }

    /**
     * @return int
     */
    public function getFriendId(): ?int
    {
        return $this->friendId;
    }

    /**
     * @return int
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * @return int
     */
    public function getUserId(): ?int
    {
        return $this->userId;
    }

}
